/*
 *  scoreBoard - ScoreBoardApp.h
 *  Copyright 2011 W. Reckman. All rights reserved.
 */
#ifndef SCORE_BOARD_APP_H
#define SCORE_BOARD_APP_H

#include <string>
#include "ofxFboTexture.h"
#include "ofTrueTypeFont.h"
#include "ofMain.h"
#include "VideoController.h"
#include "ImageFileManager.h"
#include "RemoteIO.h"
#include "OscDataReceiver.h"

using std::string;

/* Files existing in tte photobooth receive directory will not be acted upon if this define is active. */
//#define IGNORE_EXISTING_PHOTOBOOTH_FILES


class ScoreBoardApp : public ofBaseApp {
public:
	static const string CONFIG_FILE;
	
	bool debugDrawingEnabled;
	
	
	ScoreBoardApp();
	
	void setup();
	void update();
	void draw();
	
	const BoardModel& getBoard() const;
	BoardModel& getBoard();
	const ImageFileManager& getImageFileManager() const;
	ImageFileManager& getImageFileManager();
	
	void setViewportSize( int w, int h );
	void setFullscreen( bool fs );
	void toggleFullscreen();
	int getCanvasWidth() const;
	int getCanvasHeight() const;

	void keyPressed( int key );
	void keyReleased( int key );
	void mouseMoved( int x, int y );
	void mouseDragged( int x, int y, int button );
	void mousePressed( int x, int y, int button );
	void mouseReleased( int x, int y, int button );
	void windowResized( int w, int h );
	
private:
	Settings& s;
	BoardModel board;
	VideoController videoController;
	ImageFileManager imageFileManager;
	RemoteIO remoteIO;
	OscDataReceiver dataReceiver;
	
	ofxFBOTexture fboTexture;
	ofTrueTypeFont font;
	
	int canvasWidth, canvasHeight;
	int viewportWidth, viewportHeight;
	
	int screenModeChanged;
	int appFrameRate;
	bool showAppFrameRate;
};

#endif /* ! SCORE_BOARD_APP_H */
